<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
	<meta name="format-detection" content="telephone=no" />
	<script>
		var html = document.getElementsByTagName('html')[0];
		html.style.fontSize = html.clientWidth / 3.75 + "px";
	</script>
	<title>搜索</title>
	<link rel="stylesheet" href="../static/css/Reset.css" />
	<link rel="stylesheet" href="../static/css/search.css" />
</head>
<body>
	<div class="container" id="searchBody">
		<header class="header">
			<div class="search">
		        <div class="s_con1">
					<img src="../static/images/search.png">
		            <input type="text" name="keyword" class="content" id="search" @keyup="searchKeyup" v-model="keyword" placeholder="搜索商品名称/供应商名称">
		            <span class="clear" @click="clearMsg($event)">
		            	<img src="../static/images/clear.png">
		            </span>
		        </div>
			</div>
			<div class="searchBtn" @click="searchFun">搜索</div>
		</header>
		<!--搜索历史-->
		<div class="seachHistory">
			<div class="ssTitle">
				<div class="ssTitleLeft">搜索历史</div>
				<div class="ssTitleRight" @click="clearHistory"><img src="../static/images/allProduct.png" />清空</div>
			</div>
			<div class="ssContent" v-cloak>
				<span v-for="history in searchHistory" @click="clickHistory($event)">{{history}}</span>
			</div>
		</div>
		<!--推荐信息-->
		<div class="seachHistory">
			<div class="ssTitle">
				<div class="ssTitleLeft">推荐信息</div>
			</div>
			<div class="ssContent">
				<span>农庄</span>
				<span>水果</span>
				<span>农庄</span>
				<span>农庄</span>
				<span>农庄</span>
				<span>意大利农庄</span>
			</div>
		</div>
		<!--搜索结果-->
	    <div class="list" v-cloak>
	        <ul v-for="s in searchList">
				<li v-if="s.type==0" @click="jumpDetail(s.type,s.farmId)">
					<span class="c_left">{{s.farmName}}</span>
					<span class="c_center">产地</span>
					<span class="c_right">{{s.farmAddress}}</span>
				</li>
				<li v-else @click="jumpDetail(s.type,s.goodsId)">
					<span class="c_left">{{s.goodsName}}</span>
					<span class="c_center">{{s.goodsClassName}}</span>
					<span class="c_right">{{s.goodsFarmName}}</span>
				</li>
	        </ul>
	    </div>
	    <!--loading组件-->
		<loading v-show="showLoading"></loading>
	</div>
</body>
<script src="https://api.map.baidu.com/api?v=2.0&ak=1BiZDIdoRV9iryDNcdF4oU37pqwftOin&s=1"></script>
<script type="text/javascript" src="../libs/jquery.min.js"></script>
<script type="text/javascript" src="../libs/fastclick.min.js"></script>
<script type="text/javascript" src="../libs/vue/vue.min.js"></script>
<script type="text/javascript" src="../libs/vue/vue-resource.min.js"></script>
<script type="text/javascript" src="../libs/require.js"></script>
<script type="text/javascript" src="../libs/var.js"></script>
<script type="text/javascript" src="../libs/common.js"></script>
<script type="text/javascript" src="./js/search.js"></script>
</html>
